import {errorImgUrl} from '@/common/utils/config.js';
const indexConvert = {
	CarouselList: function(data){
		let result = new Array();
		data.forEach(v=>{
			result.push({'src':v.imgUrl||errorImgUrl, 'background':v.background||'#b6d3ff'});
		});
		return result;
	},
	QueryHotGoods: function(data){
		let result = new Array();
		data.forEach(v=>{
			result.push({'image':v.goodsImageList[0].url || errorImgUrl, 'title':v.goodsName,'price':v.price,'sales':v.sales||''});
		});
		return result;
	},
}

export default indexConvert 